{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "2ea15ce1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(1, 2, 3, 4, 1, 2)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a=(1,2)\n",
    "b=(3,4)\n",
    "a+b+(1,2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "42414c2e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\t1\\t2\\t3\\t4'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cates=a+b\n",
    "'\\t{}\\t{}\\t{}\\t{}'.format(cates[0],cates[1],cates[2],cates[3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "e6574820",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1, 2, 3, 4]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[1,2]+[3,4]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "07428978",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'effective_start_time': 1669852800000,\n",
       " 'effective_end_time': 1761955199000,\n",
       " 'extra': '{\"percent_provider\":\"GOCS_ads\",\"rule\":{\"service_type\":\"基础服务\",\"sub_service\":\"all\",\"entity_name\":\"ads_service_proportion\",\"service\":\"adcs日志采集\",\"type\":\"online\"}}'}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "adict={\n",
    "\t\t\t\t\t\"effective_start_time\":1669852800000,\n",
    "\t\t\t\t\t\"effective_end_time\":1761955199000,\n",
    "\t\t\t\t\t\"extra\":\"{\\\"percent_provider\\\":\\\"GOCS_ads\\\",\\\"rule\\\":{\\\"service_type\\\":\\\"基础服务\\\",\\\"sub_service\\\":\\\"all\\\",\\\"entity_name\\\":\\\"ads_service_proportion\\\",\\\"service\\\":\\\"adcs日志采集\\\",\\\"type\\\":\\\"online\\\"}}\"\n",
    "\t\t\t\t}\n",
    "adict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "684b21c8",
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "aaa=json.loads(adict.get('extra')).get('rule')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "f954fac1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'{\"service_type\": \"基础服务\", \"sub_service\": \"all\", \"entity_name\": \"ads_service_proportion\", \"service\": \"adcs日志采集\", \"type\": \"online\"}'"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(aaa)\n",
    "json.dumps(aaa,ensure_ascii=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "3dd05de1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "11048.92"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "group_19=7248.96\n",
    "cost_19=3799.96\n",
    "cost_19+group_19"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7aefbd7e",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
